package com.xo.mall.pojo.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.lang.annotation.Documented;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Document(indexName = "pms_product_search")
public class PmsProductEsModel {

    @Id
    private Integer id; // 商品id

    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_smart")
    private String productName; // 商品名称

    @Schema(description = "商品价格")
    private BigDecimal productPrice; // 商品价格

    @Schema(description = "品牌ID")
    private Integer brandId; // 品牌id

    @Schema(description = "分类ID")
    private Integer categoryId; // 分类id

    @Schema(description = "商品编码（69码）")
    private String productSn; // 商品编码

    @Schema(description = "上下架状态：0 下架，1 上架")
    private Integer shelfStatus; // 上下架状态

    @Schema(description = "审核状态：0 待审核，1 审核通过，2 审核未通过")
    private Integer verifyStatus; // 审核状态

    @Schema(description = "排序，值越大越靠前")
    private Integer sortOrder = 0; // 排序

    @Schema(description = "创建时间")
    private LocalDateTime createTime; // 创建时间

    @Schema(description = "修改时间")
    private LocalDateTime updateTime; // 修改时间

}
